# Contributor: psykose <alice@ayaya.dev>
# Maintainer: psykose <alice@ayaya.dev>
pkgname=libjwt
pkgver=1.13.1
pkgrel=0
pkgdesc="JWT C Library"
url="https://github.com/benmcollins/libjwt"
arch="all"
license="MPL-2.0"
makedepends="autoconf automake jansson-dev libtool openssl-dev"
checkdepends="check-dev"
subpackages="$pkgname-static $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/benmcollins/libjwt/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -i
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--without-examples
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
e2b4a561048dbd57deb784aa6f071e03dd2f77457c702c2e1d479b981e249ca7c9062edcbea57e68ba359c9099ad941cf95d751e9e808c6736553cf1c28d9526  libjwt-1.13.1.tar.gz
"
